﻿
/****** Object:  Database [EmployeeTracking]    Script Date: 03/25/2012 23:39:26 ******/
CREATE DATABASE [EmployeeTracking] ON  PRIMARY 
( NAME = N'EmployeeTracking', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\EmployeeTracking.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'EmployeeTracking_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\EmployeeTracking_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [EmployeeTracking] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [EmployeeTracking].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [EmployeeTracking] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [EmployeeTracking] SET ANSI_NULLS OFF
GO
ALTER DATABASE [EmployeeTracking] SET ANSI_PADDING OFF
GO
ALTER DATABASE [EmployeeTracking] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [EmployeeTracking] SET ARITHABORT OFF
GO
ALTER DATABASE [EmployeeTracking] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [EmployeeTracking] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [EmployeeTracking] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [EmployeeTracking] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [EmployeeTracking] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [EmployeeTracking] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [EmployeeTracking] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [EmployeeTracking] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [EmployeeTracking] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [EmployeeTracking] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [EmployeeTracking] SET  DISABLE_BROKER
GO
ALTER DATABASE [EmployeeTracking] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [EmployeeTracking] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [EmployeeTracking] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [EmployeeTracking] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [EmployeeTracking] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [EmployeeTracking] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [EmployeeTracking] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [EmployeeTracking] SET  READ_WRITE
GO
ALTER DATABASE [EmployeeTracking] SET RECOVERY FULL
GO
ALTER DATABASE [EmployeeTracking] SET  MULTI_USER
GO
ALTER DATABASE [EmployeeTracking] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [EmployeeTracking] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'EmployeeTracking', N'ON'
GO
USE [EmployeeTracking]
GO
/****** Object:  Table [dbo].[EtServiceTracking]    Script Date: 03/25/2012 23:39:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EtServiceTracking](
	[Id] [uniqueidentifier] NOT NULL,
	[EmployeeId] [uniqueidentifier] NOT NULL,
	[ServiceId] [uniqueidentifier] NOT NULL,
	[ClientName] [varchar](50) NOT NULL,
	[Note] [varchar](500) NOT NULL,
	[Ip] [varchar](100) NOT NULL,
	[RegisterTime] [datetime] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
 CONSTRAINT [PK_ServiceTracking_1] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[EtServiceInfo]    Script Date: 03/25/2012 23:39:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EtServiceInfo](
	[Id] [uniqueidentifier] NOT NULL,
	[ServiceName] [varchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
 CONSTRAINT [PK_Service] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[EtEmployeeInfo]    Script Date: 03/25/2012 23:39:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EtEmployeeInfo](
	[Id] [uniqueidentifier] NOT NULL,
	[EmployeeName] [varchar](100) NOT NULL,
	[EmployeeNo] [int] NOT NULL,
	[Username] [varchar](50) NOT NULL,
	[Password] [varchar](50) NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[IsDeleted] [bit] NOT NULL,
 CONSTRAINT [PK_EmployeeInfo] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Default [DF_ServiceTracking_Id]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_ServiceTracking_Id]  DEFAULT (newid()) FOR [Id]
GO
/****** Object:  Default [DF_EtServiceTracking_ClientName]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_EtServiceTracking_ClientName]  DEFAULT ('') FOR [ClientName]
GO
/****** Object:  Default [DF_ServiceTracking_Note]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_ServiceTracking_Note]  DEFAULT ('') FOR [Note]
GO
/****** Object:  Default [DF_ServiceTracking_Ip]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_ServiceTracking_Ip]  DEFAULT ('') FOR [Ip]
GO
/****** Object:  Default [DF_EtServiceTracking_RegisterTime]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_EtServiceTracking_RegisterTime]  DEFAULT (getdate()) FOR [RegisterTime]
GO
/****** Object:  Default [DF_ServiceTracking_CreateTime]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_ServiceTracking_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_ServiceTracking_UpdateTime]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_ServiceTracking_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_ServiceTracking_IsDeleted]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceTracking] ADD  CONSTRAINT [DF_ServiceTracking_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_Service_Id]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceInfo] ADD  CONSTRAINT [DF_Service_Id]  DEFAULT (newid()) FOR [Id]
GO
/****** Object:  Default [DF_Service_Issue]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceInfo] ADD  CONSTRAINT [DF_Service_Issue]  DEFAULT ('') FOR [ServiceName]
GO
/****** Object:  Default [DF_Service_CreateTime]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceInfo] ADD  CONSTRAINT [DF_Service_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_Service_UpdateTime]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceInfo] ADD  CONSTRAINT [DF_Service_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_Service_IsDeleted]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtServiceInfo] ADD  CONSTRAINT [DF_Service_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
/****** Object:  Default [DF_EmployeeInfo_Id]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_Id]  DEFAULT (newid()) FOR [Id]
GO
/****** Object:  Default [DF_EmployeeInfo_Name]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_Name]  DEFAULT ('') FOR [EmployeeName]
GO
/****** Object:  Default [DF_EmployeeInfo_EmployeeNo]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_EmployeeNo]  DEFAULT ((0)) FOR [EmployeeNo]
GO
/****** Object:  Default [DF_EmployeeInfo_Username]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_Username]  DEFAULT ('') FOR [Username]
GO
/****** Object:  Default [DF_EmployeeInfo_Password]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_Password]  DEFAULT ('') FOR [Password]
GO
/****** Object:  Default [DF_EmployeeInfo_CreateTime]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
GO
/****** Object:  Default [DF_EmployeeInfo_UpdateTime]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_UpdateTime]  DEFAULT (getdate()) FOR [UpdateTime]
GO
/****** Object:  Default [DF_EmployeeInfo_IsDeleted]    Script Date: 03/25/2012 23:39:29 ******/
ALTER TABLE [dbo].[EtEmployeeInfo] ADD  CONSTRAINT [DF_EmployeeInfo_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
